﻿' Person class
'
' This class is the base class to provide objects of various types
' of people.
' This class provides get and set methods for Street, city,
' State, ZipCode, Phone, and EMail.
' This class inherits from class Name.
'
' By Taji Abdullah 6/30/08

Public Class Person
    Inherits Name       ' Base class

    'Class variables
    Private streetName As String    ' To hold the street address
    Private cityName As String      ' To hold the city name
    Private stateName As String     ' To hold the state
    Private zipCode As String       ' to hold the zip code
    Private phoneNumber As String   ' to hold the phone number
    Private eMailAddress As String  ' to hold the email address

    ' Constructor
    Public Sub New()
        Debug.WriteLine("Person object being created.")
        streetName = " "
        cityName = " "
        stateName = " "
        zipCode = " "
        phoneNumber = " "
        eMailAddress = " "
    End Sub

    ' Street get and set methods.
    Public Property Address() As String
        Get
            Return stateName
        End Get
        Set(ByVal value As String)
            streetName = value
        End Set
    End Property

    ' City get and set methods.
    Public Property City() As String
        Get
            Return cityName
        End Get
        Set(ByVal value As String)
            cityName = value
        End Set
    End Property

    ' State get and set methods.
    Public Property State() As String
        Get
            Return stateName
        End Get
        Set(ByVal value As String)
            stateName = value
        End Set
    End Property

    ' Zip get and set methods.
    Public Property Zip() As String
        Get
            Return zipCode
        End Get
        Set(ByVal value As String)
            zipCode = value
        End Set
    End Property

    ' Phone get and set methods.
    Public Property Phone() As String
        Get
            Return phoneNumber
        End Get
        Set(ByVal value As String)
            phoneNumber = value
        End Set
    End Property

    ' EMail get and set methods.
    Public Property EMail() As String
        Get
            Return eMailAddress
        End Get
        Set(ByVal value As String)
            eMailAddress = value
        End Set
    End Property

    ' Destructor
    Public Sub Clear()
        streetName = " "
        cityName = " "
        stateName = " "
        zipCode = " "
        phoneNumber = " "
        eMailAddress = " "
    End Sub

End Class
